package com.api.shopapi.service.impl;

import com.api.shopapi.entity.CartGoods;
import com.api.shopapi.mapper.CartGoodsMapper;
import com.api.shopapi.service.CartGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author maochuan
 */
@Service("CartGoodsServiceImplOne")
public class CartGoodsServiceImpl implements CartGoodsService {

    @Autowired
    private CartGoodsMapper cartGoodsMapper;

    @Override
    public int insert(CartGoods cartGoods) {
        return cartGoodsMapper.insert(cartGoods);
    }

    @Override
    public int update(CartGoods cartGoods) {
        return cartGoodsMapper.update(cartGoods);
    }

    @Override
    public int delete(String cartGoodsCode) {
        return cartGoodsMapper.delete(cartGoodsCode);
    }

    @Override
    public List<CartGoods> getList() {
        return cartGoodsMapper.getList();
    }

    @Override
    public CartGoods getByCartGoodsCode(String cartGoodsCode) {
        return cartGoodsMapper.getByCartGoodsCode(cartGoodsCode);
    }

    @Override
    public List<CartGoods> getListByCartBusinessCode(String cartBusinessCode){
        return cartGoodsMapper.getListByCartBusinessCode(cartBusinessCode);
    }

    @Override
    public List<CartGoods> getListByGoodsCode(String goodsCode){
        return cartGoodsMapper.getListByGoodsCode(goodsCode);
    }

}
